package test1014;

import java.util.Scanner;

public class School {
    private String name;
    private int age;

    public void setName(String name) {
        this.name = name;
    }



    public School(String name){
        this.name = name;
        System.out.println("清华大学");
    }
    public School(String name, int age){
        this.name = name;
        this.age = age;
        System.out.println(this.name+"于"+this.age+"建校"+"是北京的一所985");
    }


    public void setAge(int age) {
        if (age > 2023)
            this.age = -1;
        else
            this.age = age;
    }

    public void showSchool() {
        System.out.println("School name is: " + this.name + ", and founded in " + this.age);
    }
}
